class PlayData {
  PlayData({
    this.campaign,
    this.taskNumMax,
    this.taskNumToday,
    this.taskList,
  });

  PlayData.fromJson(dynamic json) {
    campaign = json['campaign'];
    taskNumMax = json['taskNumMax'];
    taskNumToday = json['taskNumToday'];
    if (json['taskList'] != null) {
      taskList = [];
      json['taskList'].forEach((v) {
        taskList?.add(TaskModel.fromJson(v));
      });
    }
  }

  String? campaign;
  int? taskNumMax;
  int? taskNumToday;
  List<TaskModel>? taskList;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['campaign'] = campaign;
    map['taskNumMax'] = taskNumMax;
    map['taskNumToday'] = taskNumToday;
    if (taskList != null) {
      map['taskList'] = taskList?.map((v) => v.toJson()).toList();
    }
    return map;
  }
}

/// id : 0
/// gameAppId : 0
/// appName : "string"
/// description : "string"
/// logoUrl : "string"
/// adjustClickUrl : "string"
/// adjustDeeplinkUrl : "string"
/// appleBid : "string"
/// downloadUrl : "string"

class TaskModel {
  TaskModel({
    this.id,
    this.gameAppId,
    this.appleId,
    this.appName,
    this.description,
    this.logoUrl,
    this.taskLogoUrl,
    this.schemeUrl,
    this.adjustClickUrl,
    this.adjustDeeplinkUrl,
    this.appleBid,
    this.downloadUrl,
    this.appNameB,
    this.descriptionB,
    this.newState,
    this.lockState,
  });

  TaskModel.fromJson(dynamic json) {
    id = json['id'];
    gameAppId = json['gameAppId'];
    appName = json['appName'];

    description = json['description'];
    logoUrl = json['logoUrl'];
    schemeUrl = json['schemeUrl'];
    adjustClickUrl = json['adjustClickUrl'];
    adjustDeeplinkUrl = json['adjustDeeplinkUrl'];
    appleBid = json['appleBid'];
    downloadUrl = json['downloadUrl'];
    appleId = json['appleId'];
    taskLogoUrl = json['taskLogoUrl'];

    appNameB = json['appNameB'];
    descriptionB = json['descriptionB'];
    newState = json['newState'];
    lockState = json['lockState'];
  }

  int? id;
  int? gameAppId;
  String? appleId;
  String? appName;
  String? description;
  String? schemeUrl;
  String? logoUrl;
  String? taskLogoUrl;
  String? adjustClickUrl;
  String? adjustDeeplinkUrl;
  String? appleBid;
  String? downloadUrl;
  String? appNameB;
  String? descriptionB;
  int? newState;
  int? lockState;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = id;
    map['gameAppId'] = gameAppId;
    map['appleId'] = appleId;
    map['appName'] = appName;
    map['description'] = description;
    map['logoUrl'] = logoUrl;
    map['schemeUrl'] = schemeUrl;
    map['adjustClickUrl'] = adjustClickUrl;
    map['adjustDeeplinkUrl'] = adjustDeeplinkUrl;
    map['appleBid'] = appleBid;
    map['downloadUrl'] = downloadUrl;
    map['taskLogoUrl'] = taskLogoUrl;
    map['appNameB'] = appNameB;
    map['descriptionB'] = descriptionB;
    map['newState'] = newState;
    map['lockState'] = lockState;
    return map;
  }
}
